In the voice coding field, the voice coder based on the Code Excited Linear Prediction (CELP) model is the most widely applicable. As against other voice coders such as a waveform coder and a parameter coder, the CELP-based voice coder accomplishes high voice quality in the case of very low code rates, and still shows excellent performance in the case of high code rates. The CELP-based voice coder uses codebook as an excitation source, and is characterized by low rates, high quality of synthesized voice, high resistance to noise, and high performance of multiple audio transfer operations. The adaptive codebooks and fixed codebooks serving as excitation signals play a very important role in the CELP coder. The function of an adaptive filter is to remove the Long Range Dependence (LRD) from the residual voice signals. After the LRD is removed, the residual voice signals are similar to white noise (quasi-white noise), which is not suitable for precise quantization. Currently, the target signals of fixed codebooks are generally quantized effectively through (1) random codebook method; (2) regular pulse method; (3) auto-correlation algorithm; (4) transform domain algorithm; or (5) algebraic codebook method. These methods have their own characteristics, and fully use the features of fixed codebooks to quantize the signals, but have their defects in terms of quality of voice synthesis, quantity of occupied bits, and complexity of computation. The method widely applied at present is the algebraic codebook method, which has many merits unavailable from other methods. The algebraic codebook method cares about the pulse position of a fixed codebook for the target signal and regards the pulse amplitude as 1 by default. In this way, massive multiplication computation is converted into addition and subtraction computation, and the computation complexity is reduced drastically. Moreover, only the symbol and position of the pulse need to be quantized; the bits required for quantization are reduced; and high voice quality is ensured. However, at the time of searching for the best position of the pulse, a huge computation load is involved in the full search, and real-time search is impossible when there are many pulses. Therefore, a suboptimal search algorithm is required. The quality of the finally synthesized voice depends on the quality of the suboptimal search algorithm directly. Therefore, the search algorithm is vital to calculating the codebook.
A fixed codebook search method in the prior art includes the following steps:
(1) Obtain the initial codebook for pulse search.
(2) The fixed codebook searcher determines the pulse group (supposing that the group includes n pulses), and the pulse group includes at least one initial codebook pulse.
(3) Select m tracks among several tracks randomly, replace the positions of the pulses in the pulse group selected above with other positions in the m tracks, and calculate the value of the cost function Qk.
(4) Select tracks randomly for several times, and substitute the pulse group position that increases the Qk value maximally in the selected tracks for the positions of the corresponding pulses in the initial codebook.
(5) After the pulses in a pulse group are replaced, fix the pulse position of this pulse group, and substitute the pulses on other tracks for the remaining pulses in the initial codebook through step (3) and step (4).
(6) This process can be repeated.
The foregoing search method in the prior art involves very low complexity of computation, allows for the correlation between pulses, and provides high performance. However, the count of cyclic searches is fixed, which leads to a low computation efficiency of searching.
Another fixed codebook search method is provided in the prior art. This method has the following features: (1) providing similar performance as the standard method in the case of a small search count; and (2) being applicable to coders of any ACELP fixed codebook structure, and imposing no special requirements on the pulse position and the track structure. This search method includes: (a) calculating the absolute value of the likelihood function of the pulse position, to obtain the information about the position where a pulse may exist; (b) obtaining a codebook vector temporarily as an initial codebook; (c) replacing a pulse in the initial codebook, and calculating the cost function Qk; (d) judging whether the Qk value of the codebook increases after the replacement; (e) if the Qk value increases, using the new pulse to replace the old pulse from the initial codebook to obtain a new codebook; and (f) if the Qk value decreases, still using the existing codebook.
This search method is also characterized by a fixed count of cyclic searches, and also provides a low efficiency of computation.